home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / dev / misc / Gfx4PCQ.lha / WindowLib / Examples / Jumper4 / Jumper4.p < prev    next >
Encoding:
Text File  |  1997-02-09  |  1006 b   |  56 lines

  1. PROGRAM Jumper;
  2. {Another fractal generator for the windowlib. Looks somehow like the
  3.  windooze 95 logo (windoofs for germans :-)
  4.  © 1997 THOR - Software}
  5.  
  6. {$I "Include:Utils/windowlib.i"}
  7.     
  8. VAR
  9.     a,b,c    :    REAL;
  10.     
  11.     window    :    WindowPtr;
  12.     
  13. {The iteration process}
  14. PROCEDURE Jumper(window : WindowPtr);
  15. VAR
  16.     x,y    :    REAL;
  17.     tmp    :    REAL;
  18.     i    :    INTEGER;
  19. BEGIN
  20.     
  21.     x:=0;
  22.     y:=0;
  23.  
  24.     {tell windowlib we want to hear close window events}
  25.     RequestStart(window,CLOSEWINDOW_f);
  26.     REPEAT    
  27.         Plot(window,x*8+320,100-y*4);    {plot a point}
  28.  
  29.         {the iteration procedure}
  30.         tmp:=y-SIN(x);
  31.         y:=a-x;
  32.         x:=tmp;
  33.         {repeat until a request arrives}
  34.     UNTIL NextRequest(window)=CLOSEWINDOW_f;
  35.     
  36. END;
  37.     
  38. BEGIN
  39.     InitGraphics;            {init the gfx system}
  40.     
  41.     {open a window on the WB}
  42.     window:=OpenScreenWindow(NIL,0,0,640,200,2+4+8,"Jumper");
  43.     
  44.     IF window<>NIL THEN BEGIN
  45.         a:=3.1415;
  46.         
  47.         Color(window,1);    {choose pen}        
  48.         
  49.         Jumper(window);        {draw it}
  50.         
  51.         CloseAWindow(window);    {close the window}
  52.     END;
  53.  
  54.  
  55.     ExitGraphics;            {cleanup the gfx system}
  56. END.